<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">
		
		<title>Solcoo</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<!-- css -->
		<link href="css/bootstrap.css" type="text/css" rel="stylesheet" />
		<link href="css/base.css" type="text/css" rel="stylesheet" />
		<!-- js -->
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/bootstrap.min.js"></script>
		<script type="text/javascript" src="js/scrolltopcontrol.js"></script>
		<script type="text/javascript" src="js/script.js"></script>
	</head>
	<body class="card-page">
		<div class="right-bar">
			<a href="javascript:;" class="right-bar-btn qrbtn"><img src="images/qrcode1.jpg" alt="" /></a>
    		<a href="javascript:;" class="right-bar-btn totop"><img src="images/totop.jpg" alt="" /></a>
    		<div class="right-qr-download">
    			<p align="center"><a href="javascript:;"><img src="images/qrcode2.jpg" alt="" /></a></p>
        		<p align="center">体验搜卡手机优惠</p>
       			<p align="center"><a href="index.jsp">点击或扫描下载</a></p>
    		</div>
		</div>
		<div class="header">
			<div class="container">
        	<div class="span4"><a href="index.jsp"><img src="images/logox.png" alt="logo" /></a></div>
        		<ul class="span4 main-nav">
            <li><a href="index.jsp" class="btn-large"><i class="icon-home icon-white"></i>首页</a></li>
            <li class="active"><a href="card.jspDo" class="btn-large"><i class="icon-list-alt icon-white"></i>会员卡</a></li>
        </ul>
        		<div class="span4 text-right topinfo-box">欢迎您，商户请 <a href="login.jsp">登入</a></div>
    		</div>
		</div>
		<div class="container search-filter">
			<div class="nav-one">
    			<span class="nav-header">热门：</a>
		        <a href="card.jspDo?merchantType=快餐外卖" class="red first">快餐外卖</a>
		        <a href="card.jspDo?merchantType=火锅" class="red">火锅</a>
		        <a href="card.jspDo?merchantType=寿司" class="last">寿司</a>
		    </div>
		    <div class="nav-two">
		    	<span class="nav-header">本地：</span>
		    	<a href="card.jspDo" class="active first">全部</a>
		    	<c:forEach var="shAndCount" items="${shAndCounts}" varStatus="shAndCountStatus">
		    		<a href="card.jspDo?merchantType=${shAndCount.typeName}" class="">${shAndCount.typeName}<small>${shAndCount.count}</small></a>
		    	</c:forEach>
		    </div>
		</div>
		<div class="container goods-list">
			<div class="row">
    			<!-- goods list -->
    			<c:forEach var="sh" items="${shs}" varStatus="shStatus">
        		<div class="span6">
        			<div class="thumbnail">
            			<div class="goods-imapge"><img src="${sh.merchantAvatarAdr}" alt="" /></div>
                		<div class="span2 goods-info">
		                	<h2>${sh.merchantName}</h2>
		                    <p>会员人数：<span class="red">${sh.memberCount}</span>人</p>
		                    <p>商户类型：${sh.merchantType}</p>
		                    <p>商户地址：${sh.address}</p>
		                    <p>联系方式：${sh.phone}</p>
                		</div>
						<div class="clearfixo"></div><hr />
	                	<div class="event-box">
                   			<p class="event-title">
                        		<span>活动/activity</span><small>首次充值送${sh.scgz}元话费</small>
                    		</p>
                    		<ul class="event-list clearfixo">
                    			<c:forEach var="activity" items="${sh.activityList}" varStatus="activityStatus">
                    				<li>活动${activityStatus.index+1} ：<span>充${activity.inAmount}送${activity.freeAmount}元</span></li>
                    			</c:forEach>
                    		</ul>
                		</div>
            		</div>
        		</div>
        		</c:forEach>
        		<!-- goods list end -->
    		</div>
		</div>
		
		<div class="footer">
			<div class="container">
		    	<p>Copyright©2012-2013 版权所有 搜卡　　商户加入合作请拨打15381031851，搜卡欢迎您的加入！</p>
		    </div>
		</div>
	</body>
</html>